package com.sh.data.engine.domain.datadev.offline.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sh.data.engine.domain.base.model.PageResult;
import com.sh.data.engine.domain.datadev.offline.model.domain.OfflineDevOperationTaskManageDomain;
import com.sh.data.engine.domain.datadev.offline.model.enums.OfflineDevNodeTypeEnum;
import com.sh.data.engine.domain.datadev.offline.model.param.OfflineDevTaskManagerSearchParam;
import com.sh.data.engine.domain.workspace.manager.model.domain.UserDomain;
import com.sh.data.engine.repository.dao.datadev.entity.DatadevMenuNodeEntity;

import java.util.List;

public interface DatadevMenuNodeService extends IService<DatadevMenuNodeEntity> {

    boolean hasSameNode(Long excludeId, Long pid, String name, Long projectId);

    Integer getMaxSortByPid(Long pid);

    DatadevMenuNodeEntity getDatadevMenuNodeByFlowId(
        Long flowId, OfflineDevNodeTypeEnum offlineDevNodeTypeEnum);

    List<DatadevMenuNodeEntity> getDatadevMenuNodeByFlowIds(
        List<Long> flowId, OfflineDevNodeTypeEnum offlineDevNodeTypeEnum);

    List<DatadevMenuNodeEntity> getAllTaskFlowByProjectId(Long projectId);

    PageResult<OfflineDevOperationTaskManageDomain> getOfflineDevTaskManageList(
        OfflineDevTaskManagerSearchParam param);

    List<OfflineDevOperationTaskManageDomain> getOfflineDevTaskManageChildren(Long nodeId, Long projectId, Integer nodeType);

    boolean setTaskFlowScheduleStatus(List<Long> flowIds, Integer isLocked, Long projectId);

    List<UserDomain> getUserList(Long projectId);

    void getTreeIds(Long projectId, List<Long> ids, Long pid);

}
